/**
 * 
 */
package com.starview.platform.data.type;

import java.io.Serializable;
import java.util.Collection;

import com.starview.star.compiler.type.Dictionary;

public interface ITypeConstraint extends Serializable
{
  Collection<TypeVar> affectedVars();

  void checkBinding(IType candidate, Location loc, Dictionary cxt) throws TypeConstraintException;

  boolean sameConstraint(ITypeConstraint other, Location loc, Dictionary cxt) throws TypeConstraintException;

  void accept(ITypeVisitor visitor);

  void showConstraint(DisplayType disp);

  <T, C> C transform(TypeTransformer<T, C> trans);
}